%% Clear and add Dynare to path 
clear;
addpath /Applications/Dynare/5.1/matlab
cd ./m_files

%% Figure 1a
% irfs of collusion model to tfp shock
figure_1a_build;
figure_1a_print;

%% Figure 1b
% irfs of collusion model to government spending
figure_1b_build;
figure_1b_print;

%% Figure 2 
% cross-correlation of markup with output 
figure_2_build;
figure_2_print;

%% Figure 3a (Appendix Figure 1a)
% robustness of tfp cross-correlation with respect to gamma
figure_3a_build;
figure_3a_print;

%% Figure 3b (Appendix Figure 1b)
% robustness of tfp cross-correlation with respect to N 
figure_3b_build;
figure_3b_print;

%% Figure 3c (Appendix Figure 1c)
% robustness of g cross-correlation with respect to gamma
figure_3c_build;
figure_3c_print;

%% Figure 3d (Appendix Figure 1d)
% robustness of g cross-correlation with respect to N
figure_3d_build;
figure_3d_print;

%% Figure 4a (Appendix Figure 2a)
% robustness of tfp cross-correlation with respect to sigma
figure_4a_build;
figure_4a_print;

%% Figure 4b (Appendix Figure 2b)
% robustness of tfp cross-correlation with respect to eta
figure_4b_build;
figure_4b_print;

%% Figure 4c (Appendix Figure 2c)
% robustness of tfp cross-correlation with respect to epsilon
figure_4c_build;
figure_4c_print;

%% Figure 5a (Appendix Figure 3a)
% duration of tfp procyclicality with respect to a
figure_5a_build;
figure_5a_print;

%% Figure 5b (Appendix Figure 3b) -- new
% tfp cross-correlation with respect to a
figure_5b_build;
figure_5b_print;

%% Figure 5c (Appendix Figure 3c)
% duration of tfp procyclicality with respect to a
figure_5c_build;
figure_5c_print;

%% Figure 5d (Appendix Figure 3d) -- new
% g cross-correlation with respect to a
figure_5d_build;
figure_5d_print;

%% Figure 8a (Appendix Figure 6a) 
% irfs of cbase model to tfp shock
figure_8a_build;
figure_8a_print;

%% Figure 8b (Appendix Figure 6b) 
% irfs of cbase model to g shock
figure_8b_build;
figure_8b_print;

%% Figure 2 
% cross-correlation of markup with output --- cbase model
figure_9_build;
figure_9_print;